package hibernate.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

@Entity
@Table(name="users", 
	   uniqueConstraints={@UniqueConstraint(columnNames={"user_id"})})

public class User {

	public User(){}
	
	public User(int user_id){
		this.user_id = user_id;
	}

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="user_id", nullable=false, unique=true, length=11)
	private int user_id;
	
	@Column(name="username", nullable=false, length=80)
	private String username;
	
	@Column(name="birthdate", nullable=false)
	private String birthdate;
	
	@Column(name="email", nullable=false, length = 255)
	private String email; 

	@Column(name="add_date", nullable = false)
	private String add_date; 
	
	@Column (name="type", nullable = false)
	private String type;
	
	@Column(name="gender", nullable = false)
	private String gender;
	
	@Column(name="password", nullable = false, length = 80)
	private String password;
	
	@Column(name="name", nullable = false )
	private String name;
	
	@Column(name="surname", nullable = true)
	private String surname;
	
	@Column(name="phone", nullable = true)
	private String phone;
	
	@Column(name="status", nullable = false)
	private String status;
	

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public int getUser_id() {
		return user_id;
	}

	public void setUser_id(int user_id) {
		this.user_id = user_id;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getBirthdate() {
		return birthdate;
	}

	public void setBirthdate(String birthdate) {
		this.birthdate = birthdate;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}



	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getAdd_date() {
		return add_date;
	}

	public void setAdd_date(String add_date) {
		this.add_date = add_date;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSurname() {
		return surname;
	}

	public void setSurname(String surname) {
		this.surname = surname;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	
	
}
